Skip to content

fix(@angular/build): isolate Vite cache per build configuration in dev server#32944

Closed
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-31700-vite-cache-conflict
Closed

fix(@angular/build): isolate Vite cache per build configuration in dev server#32944
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-31700-vite-cache-conflict

Conversation

@maruthang
Copy link
Copy Markdown
Contributor

@maruthang maruthang commented Apr 6, 2026

Summary

  • Running two ng serve instances for the same project with different configurations (e.g., different locales) caused "504 Outdated Optimize Dep" errors
  • Both instances shared the same Vite optimizer cache directory (<cache>/<project>/vite), so when one instance updated the cache, the other detected stale metadata
  • The fix includes the build configuration name in the cache path (<cache>/<project>/vite/<configuration>), isolating each instance's cache

Closes #31700

Test plan

  • Run two ng serve instances with different configurations concurrently — no 504 errors
  • Single ng serve instance still works correctly
  • Cache directory is properly created with configuration suffix

…v server

Running two ng serve instances for the same project with different
configurations (e.g., different locales) caused "504 Outdated Optimize Dep"
errors because both instances shared the same Vite optimizer cache directory.

The fix includes the build configuration name in the Vite cache directory
path, preventing cache conflicts between concurrent dev server instances.

Closes angular#31700
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Vite dev server configuration to include the build configuration in the cache path. This change prevents potential conflicts when running multiple dev server instances with different configurations. I have no further feedback to provide.

@alan-agius4 alan-agius4 closed this Apr 7, 2026
@alan-agius4
Copy link
Copy Markdown
Collaborator

Woah, looks like you've opened a lot issues/PRs recently. While we appreciate contributions from the community, triaging and reviewing a large influx of content in a short time period takes time away from other ongoing projects. As a result, we're closing these issues/PRs to maintain the team's focus.

Note that this is not necessarily a rejection of the goals or direction of any of these contributions in particular, so much as a reflection of the team's current capacity and priorities.

You are welcome to open a smaller subset of issues/PRs focused on the most important and impactful contributions and we will do our best to prioritize a response as soon as possible.

Community contributors should limit themselves to no more than 3 open PRs at a single time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running two ng serve instances (same project, different configurations) causes “504 Outdated Optimize Dep” errors in Angular CLI 20.3.8

2 participants